<template>
  <div>
    <h1>学校:{{name}}</h1>
    <h1>地址:{{address}}</h1>
    <button @click="sendName">发送学校名称到app</button>
  </div>
</template>
<script>
  export default {
    name:'School',
    data(){
      return{name:'二师',address:'高新二路'}
    },
    methods:{
      sendName(){
        this.$emit('schoolEvent',this.name)
      }
    }
  }

</script>
<style></style>
